import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpNav {
  id!: number;
  name!: string;
  data!: unknown;
  wxapp: boolean = false;
  wxh5: boolean = false;
  h5: boolean = false;
  app: boolean = false;
  ttapp: boolean = false;
  bdapp: boolean = false;
  addTime!: string;
  updateTime!: string;
  uniacid!: number;
}

export const ImsYzdKpNavSchema = new EntitySchema({
  class: ImsYzdKpNav,
  properties: {
    id: { primary: true, type: 'number' },
    name: { type: 'string', length: 255 },
    data: { type: 'unknown', columnType: 'longtext' },
    wxapp: { type: 'boolean', default: false },
    wxh5: { type: 'boolean', default: false },
    h5: { type: 'boolean', default: false },
    app: { type: 'boolean', default: false },
    ttapp: { type: 'boolean', default: false },
    bdapp: { type: 'boolean', default: false },
    addTime: { type: 'string', length: 255 },
    updateTime: { type: 'string', length: 255 },
    uniacid: { type: 'number', index: 'uniacid' },
  },
});
